﻿@************************************************************************************//
// Autor:  			                							     				*//
//***********************************************************************************//
// DarAlta()	Acceso solo ADMINISTRADOR											*//
// Vista que devuelve la plantilla q permite Dar Alta un Mantenimiento especificado.*//
// _________________________________________________________________________________*@

@model SIBI.Models.Mantenimiento
@{
    ViewBag.Title = "Dar de Alta";
}

<h2>Dar de Alta Mantenimiento</h2>

<script src="@Url.Content("~/Scripts/myScript3.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    disablePar(['#dfim']);
    disableParDropList(['#ProveedorId', '#BienInformaticoId']);
    enableDate(['#dffm']);
</script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Mantenimiento</legend>

        @Html.HiddenFor(model => model.MantenimientoId)


<br />
    <fieldset>
    <legend>Datos Básicos</legend>
    <br />
    <table width="100%">
        <tr>
            <td width="33%">
                <div class="editor-label">
                    Serial
                </div>
                <div class="desabilitado">
                    @Html.DropDownList("BienInformaticoId", String.Empty)
                    @Html.ValidationMessageFor(model => model.BienInformaticoId)
                </div>
            <td width ="33%">
                <div class="editor-label">
                    Fecha Inicio Mantenimiento
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.dfim)
                    @Html.ValidationMessageFor(model => model.dfim)
                </div>
            </td>
            <td width ="33%">
                <div class="editor-label">
                    Fecha Final Mantenimiento (*)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.dffm)
                    @Html.ValidationMessageFor(model => model.dffm)
                    <div class="error">@ViewBag.Fail</div>
                </div>
            </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        Proveedor
                    </div>
                    <div class="desabilitado">
                        @Html.DropDownList("ProveedorId", String.Empty)
                        @Html.ValidationMessageFor(model => model.ProveedorId)
                    </div>
                </td>
                <td>
                    <div class="editor-label">
                        Estado Reparación
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.cflg)
                        @Html.ValidationMessageFor(model => model.cflg)
                    </div>
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset>
    <legend>Datos Informatívos</legend>
    <br />
                <div class="editor-label">
                    Observación
                </div>
                <div class="editor-field">
                    @Html.TextAreaFor(model => model.cobs)
                    @Html.ValidationMessageFor(model => model.cobs)
                </div>
    </fieldset>
        <p>
            <input type="submit" value="Salvar" />
        </p>
</fieldset>

}
